<%@page import="java.util.List"%>
<%@page import="java.sql.*"%>
<%@page import="model.DBAdapter"%>
<%
  	response.setHeader( "Cache-Control", "no-store, no-cache"); 
	response.setHeader("Pragma","no-cache"); 
	response.setDateHeader ("Expires", 0); 
%>	
<%	
	int userID = -1;
	int userLevel = -1;
	String login_type = "";
	String firstName = "";
	String lastName = "";
	String Enrollment_Number = "";
	String programName = "";
	try {
  		userID = ((Integer)session.getAttribute("userId")).intValue();;
  		userLevel = ((Integer)session.getAttribute("userLevel")).intValue();
  		login_type = (String)session.getAttribute("login_type");
  		firstName = (String)session.getAttribute("firstName");
  		lastName = (String)session.getAttribute("lastName");
  		Enrollment_Number = (String)session.getAttribute("Enrollment_Number");
  		programName = (String)session.getAttribute("programName");
  	} catch(Exception e) {
  		e.printStackTrace();
  	}
	
	firstName = (firstName == null ? "" : firstName);
	lastName = (lastName == null ? "" : lastName);
%>
<table style="background: #EEEEEE; border-bottom: 3px solid #CCCDDA; width:100%; border:0px; height:55px;">
	<tr>
		<td width="30%" >
			<img src="../images/assignment.png" alt="IGNOU Student Assignment Management System" align="left" style="height:20px; width:200px"/>
		</td>
		<td width="35%" >
			<b>IGNOU Student Assignment Management System</b>
		</td>
		<td width="30%" valign="top" align="right">
			<jsp:include page="loginMenu.jsp"/> 
		</td>
	</tr>
	
	<%
		if(userID != -1) {
	%>
		<tr>
		<td colspan="3">
			<table style="width:100%; align:center;" class="menuHolder" id="menu_id">
				<tr height="30px;">
				<%
					if(login_type != null && login_type.equals("Student")) {
				%>
					<td width="10%" onmouseover="return  colorChangeTemporary('studentview');" onmouseout="return colorChangeUnDo('studentview');"  id="studentview" class="subtabs" onClick="loadModule('studentview');"><a href="#" class="menuBox" >Name:<%=firstName%> <%=lastName%>&nbsp;&nbsp;(Enrollment Number:<%=Enrollment_Number%>)&nbsp;&nbsp;&nbsp;&nbsp;Program:<%=programName%></a></td>
				<%
					} else {
				%>
					<td width="10%" onmouseover="return  colorChangeTemporary('class');" onmouseout="return colorChangeUnDo('class');"  id="class" class="subtabs" onClick="loadModule('class');"><a href="#" class="menuBox">Class</a></td>
					<!-- <td width="10%" onmouseover="return  colorChangeTemporary('student');" onmouseout="return colorChangeUnDo('student');"  id="student" class="subtabs" onClick="loadModule('student');"><a href="#" class="menuBox" >Student</a></td> -->
					<td width="10%" onmouseover="return  colorChangeTemporary('go');" onmouseout="return colorChangeUnDo('go');"  id="go" class="subtabs" onClick="loadModule('go');"><a href="#" class="menuBox">Go</a></td>
					<td width="10%" onmouseover="return  colorChangeTemporary('user');" onmouseout="return colorChangeUnDo('user');"  id="user" class="subtabs" onClick="loadModule('user');"><a href="#" class="menuBox">User</a></td>
					<td width="10%" onmouseover="return  colorChangeTemporary('expenses');" onmouseout="return colorChangeUnDo('expenses');"  id="expenses" class="subtabs" onClick="return loadModule('expenses');"><a href="#" class="menuBox">Expenses</a></td>
					<td width="10%" onmouseover="return  colorChangeTemporary('settings');" onmouseout="return colorChangeUnDo('settings');"  id="settings" class="subtabs" <%=userLevel == 3? "": "onClick=\"loadModule('settings');\""%>><a href="#" class="menuBox" >Settings</a></td>
				<%
					}
				%>
					<td width="10%" onmouseover="return  colorChangeTemporary('logout');" onmouseout="return colorChangeUnDo('logout');"  id="logout" class="subtabs" onClick="window.location='../jsp/logout.jsp'"><a href="../jsp/logout.jsp" class="menuBox" >Logout</a></td>
				</tr>
			</table>
		</td>
	</tr>
	
	<%
		}
	%>
	
	
</table>

